/**
 * Created on 19/11/25
 * Function splitStr
 * params params: object
 * return str: object
 */

export function splitStr(params) {
  for (const key in params) {
    if (params[key] === '') {
      delete params[key]
    }
  }
  console.log(params)
  return params
}

export default {
  install(Vue, options) {
    Vue.prototype.$deleteNull = function(json) {
      const newJson = {}
      for (var i in json) {
        if (json[i] !== '' && json[i] !== null) newJson[i] = json[i]
      }
      return newJson
    }
  }
}
